package view;

import conponent.Entity;

import javax.swing.*;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseListener;
import java.util.List;

public class MenuView extends View implements KeyListener {
    private static JButton  btn;
    public MenuView(){
        this.setBounds(0,0,800,600);
        btn = new JButton();
        btn.setText("开始游戏");
        this.add(btn);
        this.addKeyListener(this);
    }

    public void addListener(MouseListener l){
        btn.addMouseListener(l);
    }
    @Override
    public List<Entity> getEntityList() {
        return null;
    }


    @Override
    public void keyTyped(KeyEvent e) {

    }

    @Override
    public void keyPressed(KeyEvent e) {
        System.out.println("menu:");
        System.out.println(e.getKeyCode());
    }

    @Override
    public void keyReleased(KeyEvent e) {

    }
}
